<!-- 2019-7-5 22:29:31 | 版权所有 火星科技 http://marsgis.cn -->
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1,maximum-scale=1">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="x5-fullscreen" content="true">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="keywords"
          content="&#x706B;&#x661F;&#x79D1;&#x6280;,cesium,3D,GIS,marsgis,&#x4E09;&#x7EF4;,&#x5730;&#x7403;,&#x5730;&#x56FE;,&#x5F00;&#x53D1;,&#x6846;&#x67B6;,&#x7CFB;&#x7EDF;,&#x793A;&#x4F8B;,&#x8D44;&#x6599;,&#x6A21;&#x578B;,&#x79BB;&#x7EBF;,&#x5916;&#x5305;,&#x5408;&#x80A5;,&#x5B89;&#x5FBD;,&#x4E2D;&#x56FD;">
    <meta name="description"
          content="&#x706B;&#x661F;&#x79D1;&#x6280; &#x5408;&#x80A5;&#x706B;&#x661F; &#x5408;&#x80A5;&#x706B;&#x661F;&#x79D1;&#x6280; &#x5408;&#x80A5;&#x706B;&#x661F;&#x79D1;&#x6280;&#x6709;&#x9650;&#x516C;&#x53F8; leaflet leaflet&#x6846;&#x67B6; leaflet&#x5F00;&#x53D1; cesium cesium&#x5F00;&#x53D1; cesium&#x6846;&#x67B6; &#x4E09;&#x7EF4; &#x5730;&#x7403; &#x6A21;&#x578B;  gis marsgis &#x5730;&#x56FE;&#x79BB;&#x7EBF; &#x5730;&#x56FE;&#x5F00;&#x53D1; &#x5730;&#x56FE;&#x6846;&#x67B6; &#x5730;&#x56FE;&#x5916;&#x5305; &#x6846;&#x67B6; &#x5F00;&#x53D1; &#x5916;&#x5305;  &#x5730;&#x56FE;&#x79BB;&#x7EBF; &#x4E8C;&#x7EF4;&#x5730;&#x56FE; &#x4E09;&#x7EF4;&#x5730;&#x56FE; &#x5168;&#x666F;&#x6F2B;&#x6E38; &#x5730;&#x7406;&#x4FE1;&#x606F;&#x7CFB;&#x7EDF; &#x4E91;GIS &#x4E09;&#x7EF4;GIS GIS&#x5E73;&#x53F0; WebGIS">
    <link rel="shortcut icon" type="image/x-icon" href="../docs/img/favicon/favicon.ico">
    <title>gltf &#x5C0F;&#x6A21;&#x578B; |MarsGIS for Cesium|&#x4E09;&#x7EF4;&#x5730;&#x56FE;| &#x706B;&#x661F;&#x79D1;&#x6280;|&#x5408;&#x80A5;&#x706B;&#x661F;&#x79D1;&#x6280;|&#x5408;&#x80A5;&#x706B;&#x661F;&#x79D1;&#x6280;&#x6709;&#x9650;&#x516C;&#x53F8;</title>
    <script src="../lib/include-lib.js" libpath="../lib/"
            include="jquery,jquery.range,font-awesome,bootstrap,layer,haoutil,turf,cesium-mars"></script>
    <link href="css/style.css" rel="stylesheet">
</head>
<body>
<div id="mask" class="signmask" onclick="removeMask()"></div>
<div id="cesiumContainer" class="cesium-container"></div>
<div class="infoview">
    <table class="mars-table">
        <tr>
            <td class="nametd">&#x65B9;&#x5411;</td>
            <td><input id="model_heading" type="range" min="0" max="360" step="1.0" value="10"
                       title="&#x65B9;&#x5411;heading" style="width:90px"></td>
            <td>&#x6BD4;&#x4F8B;&#xFF1A;</td>
            <td><input id="model_scale" type="range" min="1" max="999" step="1" value="200"
                       title="&#x5927;&#x5C0F;&#x6BD4;&#x4F8B;" style="width:90px"></td>
            <td><input type="button" class="btn btn-default" value="&#x5B9A;&#x4F4D;" onclick="locate()"></td>
        </tr>
    </table>
</div>
<script>function removeMask() {
    $("#mask").remove()
}

var viewer;

function initMap() {
    var e = haoutil.system.getRequestByName("config", "config/config.json");
    mars3d.createMap({
        id: "cesiumContainer", url: e, success: function (e, i) {
            viewer = e, setTimeout(removeMask, 3e3), initWork()
        }
    }), $("#model_heading").range({
        onChange: function (e, i) {
            for (var a = new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(e), 0, 0), n = viewer.entities.values, t = 0, r = n.length; t < r; t++) {
                var o = n[t];
                null != o.model && (o.orientation = Cesium.Transforms.headingPitchRollQuaternion(o.position._value, a))
            }
        }
    }), $("#model_scale").range({
        onChange: function (e, i) {
            for (var a = viewer.entities.values, n = 0, t = a.length; n < t; n++) {
                var r = a[n];
                null != r.model && (r.model.scale = e || 1)
            }
        }
    })
}

function initWork() {
    viewer.scene.debugShowFramesPerSecond = !0;
    mars3d.util.createModel({
        name: "风机",
        uri: "../data/gltf/fengche.gltf",
        x: 117.170624,
        y: 31.840666,
        z: 278.66,
        scale: 200,
        heading: 270
    }, viewer), mars3d.util.createModel({
        name: "消防员",
        uri: "../data/gltf/firedrill/xiaofangyuan-run.gltf",
        x: 117.184442,
        y: 31.842172,
        z: 33.92,
        scale: 300
    }, viewer), mars3d.util.createModel({
        name: "汽车",
        uri: "../data/gltf/CesiumGround/Cesium_Ground.gltf",
        x: 117.17525,
        y: 31.828588,
        z: 51.56,
        scale: 80
    }, viewer);
    locate()
}

function locate() {
    viewer.flyTo(viewer.entities)
}

$(document).ready(function () {
    mars3d.util.webglreport() || (alert("系统检测到您使用的浏览器不支持WebGL功能"), layer.open({
        type: 1,
        title: "当前浏览器不支持WebGL功能",
        closeBtn: 0,
        shadeClose: !1,
        resize: !1,
        area: ["600px", "200px"],
        content: '<div style="margin: 20px;"><h3>系统检测到您使用的浏览器不支持WebGL功能！</h3>  <p>1、请您检查浏览器版本，安装使用最新版chrome、火狐或IE11以上浏览器！</p> <p>2、WebGL支持取决于GPU支持，请保证客户端电脑已安装显卡驱动程序！</p></div>'
    })), initMap()
})</script>
</body>
</html>

